﻿using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Foundation;

namespace 纸片人.win2dEffectControl.DataClass
{
    public class TileEffectData : EffectOneSourceData
    {

 
        private Rect sourceRectangle =new Rect(0,0,100,100);

        public Rect SourceRectangle { get => sourceRectangle; set { sourceRectangle = value; OnPropertyChanged(); SetIsChanges(); } }
        #region 属性

        #endregion
        public override ICanvasImage GetEffect(CanvasDevice device, bool compression)
        {
            var source = GetSourceEffect(device, compression);
            if (source == null)
                return null;
            var te = new  TileEffect();
            var effect = new TileEffect()
            {
                Source = source,
                SourceRectangle = SourceRectangle

            };



            return effect;
        }


    }
}